<h2>Настройки плагина</h2>
<script type="text/javascript">
    $(document).ready(function(){

        $("div.main-text table tr:not(:first):odd").css("background", "#eee");    


        $(".install_plugin").click(
        function ()
        {
            var main = $("#main");
            var load = $("#load");

            load.fadeIn('slow');

            $.ajax({
                type: "POST", url: "admin.php?page=plugins&type=ajax&action=install&name="+this.id, data: "",

                complete: function(data)
                {
                    result = data.responseText;
                    main.html( result );
                    load.fadeOut('slow');
                }
            });
        }
        );          

        $(".remove_plugin").click(
        function ()
        {
            var main = $("#main");
            var load = $("#load");

            load.fadeIn('slow');

            $.ajax({
                type: "POST", url: "admin.php?page=plugins&type=ajax&action=remove&name="+this.id, data: "",

                complete: function(data)
                {
                    result = data.responseText;
                    main.html( result );
                    load.fadeOut('slow');
                }
            });
        }
        );             



    });

</script>     

<?php
    $plugin_array = p::get_list();
    $name =  @$_GET['name'];

    if ( $name )
    {

        echo 'Установлен:';
        if ( p::$info [ $name ]['installed']  == 1 )
        {
            echo 'да';
        }
        else
        {
            echo 'нет';
        }
        
        echo '<br><b>action:</b><br>';

        if ( isset( p::$name_action [$name] ['page'] ) )
        {
            echo 'Страницы<br>'; 
            foreach ( p::$name_action [$name] ['page']  as $id => $name)
            {
                echo '<a href="index.php?p='.$name.'">'.$name.'</a><br>';
            }
        }
        if ( isset ( p::$name_action [$name] ) )
        {
           print_r( p::$name_action [$name]  );
        }
        else
        {
            echo 'no';
        }   

    }
    else
    {
        echo 'ошибка';
    } 
?>

</div>